Currently, a mobile phone has more and more cores and emits much more heat. The temperature of each CPU in a chip is detected by a temperature sensor. For example, two temperature thresholds (i.e., T1 and T2) are set in relation to the temperature of one CPU. When the temperature reaches T2, at least one core of the CPU is disabled; when the temperature reaches T1, at least one core of the CPU is enabled. More specifically, when the temperature rises to T2, the CPU is underclocked or at least one core of the CPU is disabled gradually (e.g., for a CPU having 8 cores, several cores are disabled gradually); when the temperature drops to T1, the at least one disabled core of the CPU are re-enabled (until all the 8 cores are in operation). This causes frequent enabling and disabling of at least one core of the CPU, leading to a waste of system resources and a potential risk in system stability.